<!--
/**
* Author: gaohui
* Date: 2023-03-08 16:43
* Desc: MyButton 按钮组件
*/
-->

<template>
  <el-button :type="getCurrentType" v-bind="$attrs"> <slot /> </el-button>
</template>

<script name="MyButton" inheritAttrs="false" lang="ts" setup>
import { computed, PropType } from "vue";
const props = defineProps({
  type: {
    type: String as PropType<"primary">,
  },
});

const getCurrentType = computed(() => {
  return props?.type || "primary";
});
</script>
<style lang="scss" scoped></style>
